{include file="index@public/header" /}
<body>
    <style>
        body {
            background: #e1e0de;
        }
    
        * {
            box-sizing: border-box;
        }
        h1,
        h2,
        h3,
        h4 {
            font-weight: 700 !important;
        }
        .detail-container{
            width: 100%;
            font: 12px/14px arial,helvetica,sans-serif;
            padding-bottom:10px;
        }
        .layui-card-header {
            width: 100%;
            height:32px;
            line-height:26px;
            border-bottom: 1px solid #999 !important;
            padding-left:0px;padding-top:5px;
        }
        .layui-card-body{
            padding: 5px 0px 0px 0px;
        }
        .layui-card {
            padding: 10px 20px 50px;
            margin-bottom: -16px !important;
        }
        .layui-container {
            padding: 0 !important;
        }
        img {
            max-width: 100%;
        }
        #detai_left_main {
            width: 150px;
        }
        ::-moz-selection {
            background: #cccccc;
            color: #ffffff;
        }
    
        ::selection {
            background: #cccccc;
            color: #ffffff;
        }
    
        .layui-breadcrumb {
            padding-left: 0px; 
            visibility: visible;
        }
        .layui-breadcrumb a {
            font: 12px/14px arial,helvetica,sans-serif;
            color:#36648A;
        }
        .bearing-pdf {
            position: absolute;
            right: 8px;
            top: -10px;
            color: #cbcbcb;
            background: url(/static/uploads/2018/07/printer.png) no-repeat left center;
            padding-left: 20px;
            cursor: pointer;
        }
        #magnifier  {
            width:98%;
            min-width:500px;
            border:1px solid #D2D2D2;
            border-radius:5px;
            margin: 0 8px;
        }
    
        tr {
            border-bottom: 1px solid #ccc;
            color: #333;
        }
    
        tr:hover {
            background-color: #36648A;
            color: #ffffff
        }
    
        tr:hover .type4, tr:hover a{
            color: #ffffff
        }
    
        tr:hover .tshu2 a{
            color: #36648a
        }
        td {
            font: 12px/14px arial, helvetica, sans-serif;
            padding: 2px 2px 2px 0px;
            width: 50%;
        }
        td .input {
            margin: 5px 0;
            height: unset;
        }
        input[type="radio"]+label::before {
            content: " ";
            display: inline-block;
            vertical-align: middle;
            width: 13px;
            height: 13px;
            border-radius: 50%;
            border: 1px solid #999999;
            margin-right: 0.2rem;
            box-sizing: border-box;
            margin-top: -0.1rem;
        }

        input[type="radio"]:checked+label::before {
            background-color: #f7c542;
            background-clip: content-box;
            border: 1px solid #f7c542;
            padding: 0.05rem;
            box-sizing: border-box;
            caret-color: rgba(0,0,0,0);
        }
        input[type="radio"] {
            position: absolute;
            clip: rect(0, 0, 0, 0);
        }
        tr:hover input[type="radio"]:checked+label::before{
            background-color: #ffffff;
            border: 1px solid #ffffff;
            caret-color: rgba(0,0,0,0);
        }
        .content-bottom{
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            padding: 0 0.62rem;
        }
        .content-bottom-box{
            width: 18%;
            height: 2.5rem;
            border: 1px solid #999;
            border-radius: 0.31rem;
            box-shadow: 0 4px 3px rgb(0 0 0 / 25%);
            margin-top: .5rem;
            padding: .2rem 0 0 0;
            display: flex;
            align-items: center;
        }
        .content-bottom-img-box{
            background-color: #f6f6f6;
        }
        .content-bottom-font{
            font: 12px/14px arial, helvetica, sans-serif;
            font-weight: 700;
            padding: 5px 0 0 15px;
        }
        .content-bottom-ul, .content-bottom-li{
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .content-bottom-li{
           flex:1;
           margin: 5px 0;
        }
        .content-bottom-li a{
            display: flex;
            justify-content: flex-start;
            align-items: center;
            background-color: white;
            padding: .3rem 0;
            flex-basis: 18rem;
            border-radius: .5rem;
        }
        .content-bottom-li a div{
            background-color: white;
        }
        .content-bottom-img{
            width: 3rem;
            height: 3rem;
            display: flex;
        }
        .content-bottom-a{
            margin-left: .5rem;
        }
        .download{
            display: flex; 
            justify-content: flex-start; 
        }
        .download option{cursor: pointer;}
        .imgpdf{
            position: absolute;
            top: 2px;
            left: 8px;
        }
        .dwn{border:1px solid #838383;text-align:center;color:#838383;cursor:pointer;border-radius:5px;padding:0px 2px;text-decoration:none;display:inline-block;margin-top:10px;margin-left:5px;}
        .dwn:hover{background-color:#33648B;color:#ffffff;}
        .dwn:hover img{content:url("{:Config::get('app.images_host')}/images/web/downhover.png");}
        .dwnnew{color: #333;}
        .dwnnew:hover{background-color:#33648B;color:#ffffff;}
        .dwnnew:hover img{content:url("{:Config::get('app.images_host')}/images/web/downhover.png");}
        .product-content {
            display: none;
        }
        .flex-center {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .tab-head {
            border: solid 1px #ccc;
            margin: 0 10px 0;
        }
        .tab-data {
            border-top: unset;
        }
        .tab-head > div {
            flex: 1;
            height: 45px;
            border-right: solid 1px #ccc;
        }
        .tab-head > div:first-child {
            flex: 0.5;
        }
        .tab-head > div:last-child {
            border-right: unset;
        }
        .tab-head > div > div:first-child{
            width: 30%;
        }
        .tab-head > div > div:last-child{
            width: 60%;
        }
        .tab-data > div > div:first-child {
            width: 30px;
        }
        .tab-data > div > div:last-child {
            width: unset;
        }
        .tab-head img {
            width: 36px;
            object-fit: contain;
            object-position: center;
        }
    </style>
<div class="layui-container detail-container" > 
    <div class="layui-card">
        <span class="layui-breadcrumb" lay-separator="/">
      <a href="/" style="font: 12px/14px arial,helvetica,sans-serif;">{:lang('Home')}</a>
      {foreach $crumbs as $k=>$v }
      <a href="/{$v['crumbs_url']}" style="font: 12px/14px arial,helvetica,sans-serif;color:#36648A">{$v['alias_name']}</a>
      {/foreach}
    </span>
        <div class="layui-card-header">
            <h1>{$zhu['part_number']} Ceramic Bearing</h1>
        </div>

        <div class="layui-card-body" style="max-width: 1600px;">
            <div class="layui-row">
                <div style="float:left; max-width:33%;">
                    <div class="layui-col-md4">
                        <img src="{:Config::get('app.images_host')}{$zhu['img']}?t={:time()}" id="detai_left_main" />
                
                            
                        <!-- 检测当前产品是否有重复型号，有重复型号的只要每个型号中有一个参与购物的 其他所有产品都要参与购物 -->
                        <style type="text/css">
                            .detail-add-order .detail-order-input {height:25px;line-height:25px;margin-top:10px;}
                            .detail-add-order .detail-order-input input{height: 20px;margin: 0;margin-top:2px;background-color: #eee;border: 1px solid #878787;padding:2px 3px;border-radius:2px;}
                            .detail-add-order .detail-order-input input:focus{background-color: #ffffff;border: 1px solid #36648a}
                            .detail-add-order .detail-order-button{margin-top:5px;}
                            .detail-add-order .detail-order-button button{background-color: #FDD702;cursor:pointer;width:100%;color:black;padding:0px;border:1px solid #ffffff;padding:5px 0px;border-radius:5px;}
                            .detail-add-order .detail-order-button-b button{background-color: #ffa41c;cursor:pointer;width:100%;color:black;padding:0px;border:1px solid #ffffff;padding:5px 0px;border-radius:5px;}
                            .detail-add-order .detail-order-button button:hover{background-color: #36648a;color:#ffffff;}
                            #gou-zhuyi-content {
                                display: none;
                                width:240px;
                                padding: 10px 0 10px 15px;
                                color:#333;
                                background-color:#eee;
                                position:absolute;
                                left:25px;
                                top:-110px;
                                z-index:999;
                                box-shadow: 2px 2px 2px rgba(0,0,0,0.4);
                                font: 12px/14px arial, helvetica, sans-serif;
                            }
                            #gou-zhuyi:hover #gou-zhuyi-content{
                               display: block;
                            }
                        </style>
                        <div class="detail-add-order" style="width: 80%;margin: 0 auto;">
                            <div>
                                Price <span style="color:#19792f;margin-right: 5px;"><span style="margin:0 5px 0 10px;">$</span>{$zhu['price']}</span>                              
                                <i class="layui-icon layui-icon-about" id="gou-zhuyi" style="position: relative;top:2.5px;font-size: 18px;color: #36648a;cursor: pointer;">
                                    <div id='gou-zhuyi-content'>
                                        Bulk orders will be discounted, please <a href='/contact-us/'>contact our sales</a> for a bulk quote.</p><p style="padding-top:10px">We will ship your order via FedEx within 3-5 working days after you complete the payment and the related information will be sent to your email.
                                    </div>
                                </i>
                                
                            </div>

                            <div class="detail-order-input">
                                Number<input id="detail-order-input" style="float: right;width: 50%;margin-right: 1px;" oninput="value=value.replace(/[^\d]/g,'')">
                            </div>
                            
                            <div class="detail-order-button"><button type="button" onclick="detail_order_input(1)">Add To Order</button></div>
                            <div class="detail-order-button detail-order-button-b"><button type="button" onclick="detail_order_input(2)">Buy Now</button></div>
                        </div>
                            
                    </div>
                    <div class="layui-col-md8">
                        <table>
                            <tr>
                                <td>Part Number</td>
                                <td>{$zhu['part_number']}</td>
                            </tr>
                            <tr>
                                <td>System of Measurement</td>
                                <td>{$zhu['system']}</td>
                            </tr>
                            <tr val="{$zhu['Seal Type']}">
                                <td>Seal Type</td>
                                <td>
                                    <div class="input"><input id="Open"   type="radio" name="Seal_Type" value="Open"><label for="Open">Open</label></div>
                                    <div class="input"><input id="Sealed" type="radio" name="Seal_Type" value="Sealed"><label for="Sealed">Sealed</label></div>
                                </td>                          	
                            </tr>
                            <tr val="{$zhu['Ring Material']}">
                                <td>Ring Material</td>
                                <td>
                                    <div class="input"><input id="Zirconia" type="radio" name="Ring_Material" value="Zirconia"><label for="Zirconia">Zirconia</label></div>
                                    <div class="input"><input id="Nitride" type="radio" name="Ring_Material" value="Silicon Nitride"><label for="Nitride">Silicon Nitride</label></div>
                                    <div class="input"><input id="Carbide" type="radio" name="Ring_Material" value="Silicon Carbide"><label for="Carbide">Silicon Carbide</label></div>
                                    <div class="input"><input id="Hybrid"  type="radio" name="Ring_Material" value="Hybrid Ceramic"><label for="Hybrid">Hybrid Ceramic</label></div>
                                </td>                             	
                            </tr>
                            {foreach $detail as $k=>$v}
                            <tr>
                                <td>{$k}</td>
                                <td>{$v}</td>
                            </tr>
                            {/foreach}
                        </table>
                        
                    </div>
                </div>
                <div style="float:left; max-width:50%;">
                    <img src="{:Config::get('app.images_host')}{$zhu['dimg']}" id="magnifier_r_img" style="width:100%;border:1px solid #D2D2D2;border-radius:5px;min-width:500px"/>
                    <div style="width:98%;margin-left: 1%;height: 30px;line-height: 30px;" id="magnifier_r_pdf">
                        <a href="{:Config::get('app.images_host')}{$zhu['pdf']}" target="view_window" class="dwnnew" style="border: 1px solid #D2D2D2;height: 24px;float: left;line-height:24px;padding: 0px 8px 0px 5px;text-decoration: none;border-radius: 3px;margin-top:3px;">
                            <img src="{:Config::get('app.images_host')}/images/web/downindex.png" style="height: 19px;margin-top:-5px;">Download Pdf
                        </a>
                    </div>

                    <div class="product-content">
                        <div class="tab-head flex-center">
                            <div></div>
                            <div class="flex-center">
                                <div class="flex-center"><img src="{:Config::get('app.images_host')}/images/class/1660284995846.jpg"></div>
                                <div>Zirconia Ceramic</div>
                            </div>
                            <div class="flex-center">
                                <div class="flex-center"><img src="{:Config::get('app.images_host')}/images/class/1660284957716.jpg"></div>
                                <div>Silicon Nitride</div>
                            </div>
                            <div class="flex-center">
                                <div class="flex-center"><img src="{:Config::get('app.images_host')}/images/class/1660284957881.jpg"></div>
                                <div>Silicon Carbide</div>
                            </div>
                            <div class="flex-center">
                                <div class="flex-center"><img src="{:Config::get('app.images_host')}/images/class/mstandard.jpg"></div>
                                <div>Hybrid Ceramic</div>
                            </div>
                        </div>

                        <div class="tab-head tab-data flex-center">
                            <div class="flex-center">
                                <div class="flex-center"><img src="{:Config::get('app.images_host')}/images/class/1660284995846.jpg"></div>
                                <div>Open</div>
                            </div>
                            <div class="flex-center">
                                <a href="/test/{$series['PN']}/{$series['CEZR'][0]['url_product']}" data-type="Open" data-material="Zirconia">{$series['CEZR'][0]['part_number']}</a>
                            </div>
                            <div class="flex-center">
                                <a href="/test/{$series['PN']}/{$series['CESI'][0]['url_product']}" data-type="Open" data-material="Silicon Nitride">{$series['CESI'][0]['part_number']}</a>
                            </div>
                            <div class="flex-center">
                                <a href="/test/{$series['PN']}/{$series['CESC'][0]['url_product']}" data-type="Open" data-material="Silicon Carbide">{$series['CESC'][0]['part_number']}</a>
                            </div>
                            <div class="flex-center">
                                <a href="/test/{$series['PN']}/{$series['Hybrid'][0]['url_product']}" data-type="Open" data-material="Hybrid Ceramic">{$series['Hybrid'][0]['part_number']}</a>
                            </div>
                        </div>

                        <div class="tab-head tab-data flex-center">
                            <div class="flex-center">
                                <div class="flex-center"><img src="{:Config::get('app.images_host')}/images/products/ce6902zrpp.jpg"></div>
                                <div>Sealed</div>
                            </div>
                            <div class="flex-center">
                                <a href="/test/{$series['PN']}/{$series['CEZR'][1]['url_product']}" data-type="Sealed" data-material="Zirconia">{$series['CEZR'][1]['part_number']}</a>
                            </div>
                            <div class="flex-center">
                                <a href="/test/{$series['PN']}/{$series['CESI'][1]['url_product']}" data-type="Sealed" data-material="Silicon Nitride">{$series['CESI'][1]['part_number']}</a>
                            </div>
                            <div class="flex-center">
                                <a href="/test/{$series['PN']}/{$series['CESC'][1]['url_product']}" data-type="Sealed" data-material="Silicon Carbide">{$series['CESC'][1]['part_number']}</a>
                            </div>
                            <div class="flex-center">
                                <a href="/test/{$series['PN']}/{$series['Hybrid'][1]['url_product']}" data-type="Sealed" data-material="Hybrid Ceramic">{$series['Hybrid'][1]['part_number']}</a>
                            </div>
                        </div>
                    </div>
                </div>
                
                {include file="index@public/form" /}
            </div>

            <!-- 推荐型号 -->
            <div class="content-bottom-img-box" style="margin-top:30px;">
                <div class="content-bottom-font" style="padding:5px;">Recommended Products</div>
                <ul class="content-bottom-ul" style="padding-left:5px">
                    {foreach $recommend as $k=>$v}
                    <li class="content-bottom-li">
                        <a href="{$v['url_product']}">
                            <div class="content-bottom-img"><img src="{:Config::get('app.images_host')}{$v['img']}"></div>
                            <div class="content-bottom-a">{$v['part_number']}</div>
                        </a>
                    </li>
                    {/foreach}                   
                </ul>
            </div>
        </div>
    </div>
</div>   
{include file="index@public/footer" /}   
<script>
    Product_Number = $('cite').text();
    $("#detail-order-input").focus();
    $('input[type="radio"]').each(function() {
        var id_name = $(this).attr("id")
        var value = $(this).attr("value");

        if($(this).parents('tr').attr('val') == value){
            $(this).attr("checked",'checked')
        }

        $(`#${id_name}`).click(function() {
            seal_type     = $('input[name=Seal_Type]:checked').val();
            ring_material = $('input[name=Ring_Material]:checked').val(); 
            
            $(".product-content a").each(function() {
                var data_type     = $(this).attr("data-type")
                var data_material = $(this).attr("data-material")
                if(seal_type ==data_type && ring_material == data_material) {
                    window.location.href = $(this).attr("href")
                }
            })
        })
    })
</script>
<script type="text/javascript">
    var lasturl=<?php if(isset($_SERVER['HTTP_REFERER'])){ echo "'".$_SERVER['HTTP_REFERER']."'";}else{echo "'"."'";}?>;/*上一个页面的url 不能在ajax里面书写这样就多了一层页面关系*/
    var nowurl=window.location.href;/*当前页面url*/
    var posturl="{:url('index/Index/send_inquiry')}";
</script>
<script src="/static/js/form.js?v={:time()}" charset="utf-8"></script>

